// @ts-ignore
/* eslint-disable */
import request from '@/request';

/** 此处后端没有提供注释 POST /app/create */
export async function createApp(body: API.AppCreateRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>('/app/create', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /app/delete */
export async function deleteApp(body: number, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>('/app/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /app/list */
export async function getAppList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getAppListParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListAppVO>('/app/list', {
    method: 'GET',
    params: {
      ...params,
      appSearchRequest: undefined,
      ...params['appSearchRequest'],
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /app/review */
export async function reviewApp(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reviewAppParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean>('/app/review', {
    method: 'POST',
    params: {
      ...params,
      reviewRequest: undefined,
      ...params['reviewRequest'],
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /app/update */
export async function updateApp(body: API.AppUpdateRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>('/app/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
